# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

_pkgname=pyadi-iio
pkgname=python-$_pkgname
pkgver=0.0.15
pkgrel=2
pkgdesc='Python interfaces for ADI hardware with IIO drivers'
arch=('any')
url='https://github.com/analogdevicesinc/pyadi-iio'
license=('custom')
depends=('python-pylibiio' 'python-numpy' 'python-paramiko')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
#             'python-sphinx' 'python-sphinx_rtd_theme' 'python-myst-parser')
checkdepends=('python-pytest' 'python-scapy')
source=("$pkgname-$pkgver.tar.gz::$url/archive/v$pkgver.tar.gz")
sha512sums=('8c5adb7d1f45907213656fc989396127eb6c7ea141a64c881f60051e1e384fdc4cb4d47878b34d281540b0ff89a67a74361b7777b9b9d2ae520ea8784125d9ca')

build() {
  cd $_pkgname-$pkgver

  python -m build -nw

#  cd doc
#
#  make html
}

# need liblibc.a
#check() {
#  cd $_pkgname-$pkgver
#
#  python -m pytest
#}

package() {
  cd $_pkgname-$pkgver

  python -m installer -d "$pkgdir" dist/*.whl

  # Remove tests
  rm -rf "$pkgdir"/usr/lib/python*/site-packages/test

  # Install documentation
#  install -dm 755 "$pkgdir"/usr/share/doc/$pkgname
#  cp -r -a --no-preserve=ownership doc/build/html "$pkgdir"/usr/share/doc/$pkgname
#
#  install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}

# vim:set ts=2 sw=2 et:
